<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Admin1 extends Model
{
    //
    protected $table = 'admin1s';
    protected $primaryKey = 'id';

    //admin1-admin
    public function admin1_hasone_admin(){
        return $this->hasOne('App\Models\admin','id','role');
    }
    public function admin1_hasmany_admin()
    {
        return $this->hasMany('App\Models\admin','id','role');
    }
    public function admin1_belongsTo_admin(){
        return $this->belongsTo('App\Models\admin','role','id');
    }


    //admin1-article
    public function admin1_hasmany_article()
    {
        return $this->hasMany('App/Models/Article','id','page_views');
    }
}
